﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using SingleUserMall.Authorization.Users;
using SingleUserMall.Items;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingleUserMall.Users.VO
{
    [AutoMapFrom(typeof(UserFavorite))]
    public class UserFavoriteVO : EntityDto<long>
    {
        /// <summary>
        /// 商品id
        /// </summary>
        public long ItemId { get; set; }
        internal Item inItem { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name => inItem?.Name;
        /// <summary>
        /// 图片
        /// </summary>
        public string Picture => inItem?.Picture;
        /// <summary>
        /// 最低价格（根据规格设定）
        /// </summary>
        public decimal Price => inItem?.Price ?? 0;
    }
}
